package model

import (
	"time"
)

type LogQuery struct {
	PageNo    int
	PageSize  int
	FuncId    string
	StartTime int64
	EndTime   int64
	RequestId string
	Status    string
}

type MetricQuery struct {
	StartTime  int64
	EndTime    int64
	Period     int
	MetricName string
	FuncId     string
}

type RegionMetricResult struct {
	InvokeCount   int64   `json:"invokeCount"`
	GroupCount    int64   `json:"groupCount"`
	ComputePower  float64 `json:"computePower"`
	FunctionCount int64   `json:"functionCount"`
}
type RegionMetricFunctionResult struct {
	FunctionCount int64 `json:"functionCount"`
}

type MetricResult struct {
	Time time.Time
	Data float64
}

type FunctionListQuery struct {
	PageNo       int
	PageSize     int
	Creator      string
	AccountId    string
	FunctionName string
	GroupId      string
}

type LayerListQuery struct {
	PageNo    int
	PageSize  int
	Creator   string
	AccountId string
	LayerName string
}

type LayerListResult struct {
	TotalCount      int      `json:"totalCount"`
	RecordsFiltered int      `json:"recordsFiltered"`
	Result          []*Layer `json:"result"`
}

type LayerVersionListResult struct {
	LayerId     string   `json:"layerId"`
	LayerName   string   `json:"layerName"`
	RegionCode  string   `json:"regionCode"`
	RegionName  string   `json:"regionName"`
	VersionList []*Layer `json:"versionList"`
}

type LogResult struct {
	TotalCount      int       `json:"totalCount"`
	RecordsFiltered int       `json:"recordsFiltered"`
	Result          []*Invoke `json:"result"`
}

type FunctionListResult struct {
	TotalCount      int         `json:"totalCount"`
	RecordsFiltered int         `json:"recordsFiltered"`
	Result          []*FuncInfo `json:"result"`
}
